#include <stdio.h>
int main(){
    int arr[]={10,20,30,40,50};
    int *ptr=arr;
    printf("Pointer arithmetic:\n");
    for(int i=0;i<5;i++){
        printf("arr[%d]=%d, *(ptr+%d)=%d\n",i,arr[i],i,*(ptr+i));
    }
    //multi level pointer
    int x=100;
    int *p1=&x;
    int **p2=&p1;
    int ***p3=&p2;
    printf("Multi level pointer:\n");
    printf("Value of x=%d\n",x);
    printf("Value of x using p1=%d\n",*p1);
    printf("Value of x using p2=%d\n",**p2);
    printf("Value of x using p3=%d\n",***p3);
    return 0;
}